package com.warm.system.service.impl;

import com.warm.core.page.TableDataInfo;
import com.warm.orm.domain.sys.SysTenantPackage;
import com.warm.system.api.orm.agent.SysTenantAgent;
import com.warm.system.api.orm.agent.SysTenantPackageAgent;
import com.warm.system.service.ISysTenantPackageService;
import org.noear.solon.annotation.Component;
import org.noear.solon.annotation.Inject;

import java.util.List;

/**
 * 租户套餐Service业务层处理
 *
 * @author hh
 * @date 2023-10-26
 */
@Component
public class SysTenantPackageServiceImpl implements ISysTenantPackageService {

    @Inject(required = false)
    private SysTenantPackageAgent tenantPackageAgent;

    @Inject(required = false)
    private SysTenantAgent tenantAgent;



    @Override
    public SysTenantPackage selectById(Long packageId) {
        return tenantPackageAgent.selectById(packageId);

    }

    @Override
    public TableDataInfo<SysTenantPackage> selectPage(SysTenantPackage sysTenantPackage) {
        return tenantPackageAgent.selectPage(sysTenantPackage);
    }

    @Override
    public List<SysTenantPackage> selectList() {
        return tenantPackageAgent.selectList();
    }

    @Override
    public List<SysTenantPackage> selectList(SysTenantPackage sysTenantPackage) {
        return tenantPackageAgent.selectList(sysTenantPackage);
    }

    @Override
    public boolean insert(SysTenantPackage sysTenantPackage) {
        return tenantPackageAgent.insert(sysTenantPackage);
    }

    @Override
    public boolean update(SysTenantPackage sysTenantPackage) {
        return tenantPackageAgent.update(sysTenantPackage);
    }

    @Override
    public boolean deleteByIds(Long[] packageIds) {
        return tenantPackageAgent.deleteByIds(packageIds);
    }

    @Override
    public int changeStatus(SysTenantPackage sysTenantPackage) {
        return tenantPackageAgent.updateTenantPackage(sysTenantPackage);
    }


}
